package com.shop.entity;
/*CREATE TABLE goods (
`id` BIGINT(16) NOT NULL auto_increment PRIMARY KEY COMMENT '商品编号（主键）',
`imgPath` VARCHAR(50) NOT NULL COMMENT '图片路径',
`price` DOUBLE NOT NULL COMMENT '商品价格',
`colors` VARCHAR(30) NOT NULL COMMENT '颜色',
`sizes` VARCHAR(30) NOT NULL COMMENT '尺寸',
`discount` DOUBLE NULL COMMENT '商品折扣',
`merchant_id` BIGINT(16) NULL COMMENT '商户编号（外键）',
foreign key (`merchant_id`) references merchant(`id`)
)ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;*/
public class Goods {
	private Integer id ;
	private String imgPath ;
	private String name ;
	private Double price ;
	private String colors ;
	private String sizes ;
	private Double discount ; 	//折扣
	private Merchant merchant ; 			//商户外键	n:1
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getImgPath() {
		return imgPath;
	}
	public void setImgPath(String imgPath) {
		this.imgPath = imgPath;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Double getPrice() {
		return price;
	}
	public void setPrice(Double price) {
		this.price = price;
	}
	public String getColors() {
		return colors;
	}
	public void setColors(String colors) {
		this.colors = colors;
	}
	public String getSizes() {
		return sizes;
	}
	public void setSizes(String sizes) {
		this.sizes = sizes;
	}
	public Double getDiscount() {
		return discount;
	}
	public void setDiscount(Double discount) {
		this.discount = discount;
	}
	public Merchant getMerchant() {
		return merchant;
	}
	public void setMerchant(Merchant merchant) {
		this.merchant = merchant;
	}
	public String toString(){
		return "Goods[id="+this.id+
				",imgPath="+this.imgPath+
				",name="+this.name+
				",discount="+this.discount+
				",price="+this.price+
				",colors="+this.colors+
				",sizes="+this.sizes+
				",merchantId="+this.merchant.getId()+
				"]" ; 
	}
}
